<div style="padding-top:50px;">
    <div  style='width:80%;margin: 0 auto;clear: both;font-size:18px;color:#080'>
        <center>
            <input type="button" name="up_orgstructure" value="更新公司组织架构" style="width:250px;height:45px;font-size:18px;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
            <input type="button" name="up_telnum" value="更新职员手机分机号码" style="width:250px;height:45px;font-size:18px;">
        </center>
    </div>
</div>
<script>
    $(function () {
        $('input[name="up_orgstructure"]').click(function () {
            ajax(0);
        });
        $('input[name="up_telnum"]').click(function () {
            ajax(1);
        });

        /**
         * ajax 获取请求
         */
        function ajax(flag)
        {
            $.ajax({
                url: '__MODULE__/Updatedata/update',
                type: 'post',
                data: {
                    flag: flag,
                },
                dataType: 'json',
                success: function (data) {
                    if (data.status == 'suc') {
                        alert(data.msg);
                    } else if (data.status == '') {
                        alert('查询失败。');
                    }
                }
            })
        }
    })


</script>
